function reducer(state = [  ] , action = { type:'' , params : null }) {
    var newState = JSON.parse(JSON.stringify( state ));

    switch ( action.type ) {
        case 'ADD' :
        //* ----逻辑代码------
        newState = action.params
        return newState;

        
        //* ----逻辑代码------
        case 'CLEARCALLECT' :
        let calleId =  newState.findIndex((item)=>{
            return item == action.params
        })
        if( calleId != -1 ) {
            calleId.splice(calleId,1)
        }
        return newState;
        
        default: return state;
    }


    // return newState;
}

export default reducer;